<head>
	<!--<meta charset="utf-8" />
	<link rel="stylesheet" href="/BackEndRecursosHumanos/app/webroot/css/smoothness/jquery-ui-1.10.3.custom.min.css" />
	<script type="text/javascript" src="/BackEndRecursosHumanos/app/webroot/js/jquery-1.9.1.js"></script>
	<script type="text/javascript" src="/BackEndRecursosHumanos/app/webroot/js/jquery-ui-1.10.3.custom.min.js"></script>
	<script src="/BackEndRecursosHumanos/app/webroot/js/jquery.mousewheel.js"></script>
  	<script src="/BackEndRecursosHumanos/app/webroot/js/globalize.js"></script>-->
	<!--<link rel="stylesheet" type="text/css" href="/BackEndRecursosHumanos/app/webroot/css/ui-lightness/jquery-ui-1.10.3.custom.min.css">-->
	
	<!--<script type="text/javascript" src="/BackEndRecursosHumanos/app/webroot/js/jquery-ui-i18n.js"></script>-->
  	<!--<link rel="stylesheet" href="/BackEndRecursosHumanos/app/webroot/css/stylespinner.css" />-->
	
	<style>
	  .selectable_beneficio .ui-selecting { background: #8C8E92; }
	  .selectable_beneficio .ui-selected { background: #36393C; color: white; }
	  .selectable_beneficio { list-style-type: none; margin: 0; width: 60%; }
	  
	 
  	</style>
	
	<script>
		
		function sede()
		{
        	
        	<?php 
        	
        		$sede_busq = $this->requestAction('/ConfiguracionSedes/getSede/');
        		echo '$("#table_id tr").remove();';
        		if ($sede_busq)
        		{
        			foreach ($sede_busq as $sede)  
	        		{
						
						echo 'var o = new Option("'.$sede['Sede']['nombre_sede'].'", "'.$sede['Sede']['id'].'");';
						echo '$(o).html("'.$sede['Sede']['nombre_sede'].'");';
						echo '$("#BeneficiosAdministrativoTipoOpcion1").append(o);';	
						echo '$("#table_id").append($("<tr> <td>'.$sede['Sede']['nombre_sede'].'</td> </tr>"));';
			
					}
        		}
        		
        	
        	?>
        	
		}
	</script>
	
	
	
</head>
<body>
	<center>
		<?php echo $this->Form->create('BeneficiosAdministrativo',array('type' => 'file'));
			?>
		<fieldset>
		
			<center>	
			
				<table>
					<tr>
						<td>
							<?php 
							
									
							
								echo $this->Form->input('tipo_opcion',array(
																				'options' => array($sedes),
																				'label' => array(
																									'style' => array(
																														'display:none'
																													)
																								),
																				'style' => array('width: 50%'),
																				
																				'onchange' => 'sede();'
																		   )
												 						 ); 
							
							?>
						</td>
						<td>
							<?php 
							
									
							
								echo $this->Form->input('tipo_opcion1',array(
																				'options' => array(),
																				'label' => array(
																									'style' => array(
																														'display:none'
																													)
																								),
																				'style' => array('width: 50%'),
																				
																				'onchange' => 'sede();'
																		   )
												 						 ); 
							
							?>
						</td>
					</tr>
					<tr>
						<td>
							<table id ="table_id" >
								
							</table>
						</td>
					</tr>
				</table>
			
			</center>
		</fieldset>
		<?php
			echo $this->Form->end('Validar Configuracion'); 
			
			?>
			
		
	</center>
</body>